<?
    foreach ($this->p_settings as $id => $item)
    {
        $expand = (isset($this->expand_settings_id)) && ($this->expand_settings_id == $id);
?>
<li class="has_content">
    <div class="node_pict <?=($expand ? " opened" : "closed")?>" id="settings_<?=$id ?>" onClick="expandMenu({controller: 'settings', level: <?=$item['level'] ?>})"></div>
    <a href="" onClick="ajax<?=$item['caption'] ?>({id: <?=$id ?>, action: 'index', container: 'inner', no_apply: true}); return false;"><?=$item['caption'] ?></nobr></a>
    <ul id="settings_<?=$id ?>_content" <? if ($expand) echo "style=\"display: block;\""; ?>>
<?
        if ($expand)
            echo $this->expand;
?>
    </ul>
</li>
<?
    };

    foreach ($this->s_settings as $id => $caption)
    {
?>
<li id="settings_<?=$id ?>">
    <a href="" onClick="ajaxSettings({id: <?=$id ?>, action: 'edit', container: 'inner', no_apply: true}); return false;"><nobr><?=$caption ?></nobr></a>
</li>
<?
    };
?>